/*
 * Copyright (C) 2021  FunGuide, Inc. All Rights Reserved.
 */


package com.yxw.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Simple to Introduction
 * className: ConfigClientController
 *
 * @author yanxw
 * @version 2021/5/3 10:16 上午
 */

@RestController
@RefreshScope   //SpringCloud原生注解 支持Nacos的动态刷新功能
public class ConfigClientController {

    @Value("${config.info}")
    private String configInfo;

    @GetMapping("/config/info")
    public String getConfigInfo(){
        return configInfo;
    }
}

